package controller;

import csel.controller.dispatchers.Dispatcher;
import csel.model.GameCommand;
import csel.model.Invoker;

public class TestThatDispatchShitSon
{
	public static void main(String[] args) throws InterruptedException
	{
		Dispatcher disp = new Dispatcher( new Thing() );
		disp.startDispatcher();
		disp.registerCommand( new GC() );
		disp.registerCommand( new GC() );
		disp.registerCommand( new GC() );
		Thread.sleep(1000);
		disp.stopDispatcher();
	}
	
	private static class Thing implements Invoker
	{
		public void accept(GameCommand gc)
		{
			gc.execute();
		}
	}
	
	private static class GC implements GameCommand
	{
		public void execute()
		{
			System.out.println("I done been haccepted.");
		}
	}
}
